Login     Sign up
Error with user's profile box
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Hello I am having an issue resulting in my users now not being able to add or follow other members of the site. The only thing they can do is write a message to the user. It seems as though the add friend and follow disappeared and the only thing left is 'message' and it shows the last login information

163 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Error looks like the following:

[img]http://www.tb-creations.com/jcowpage/errorinpage.jpg[/img]

163 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

why you want to add another member if he already is your friend ?

163 months ago
sujay sreedhar (@webkoot)
Join date: Nov 11th 2010
Community posts: 98
View Profile
Send Message

but it have 2 show follow?

163 months ago
sujay sreedhar (@webkoot)
Join date: Nov 11th 2010
Community posts: 98
View Profile
Send Message

but it have 2 show follow?

163 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

u.module.php
function show_sidebar()

change

[code]
if ($owner['is_friend']) {
$output .=
'<table>
<tr>
<td align="right"><img src="'.uhome().'/files/icons/message.gif" /></td><td align="left"><a href="'.url('message/compose/u'.$owner['id']).'">'.t('Message').'</a></td></tr>
</table>';
}
[/code]

to

[code]
if ($owner['is_friend']) {
$output .=
'<table>
<tr>
<td align="right"><img src="'.uhome().'/files/icons/profile.gif" /></td><td align="left">'.$follow_url.'</td>
<td align="right"><img src="'.uhome().'/files/icons/message.gif" /></td><td align="left"><a href="'.url('message/compose/u'.$owner['id']).'">'.t('Message').'</a></td></tr>
</table>';
}
[/code]

163 months ago
1
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Thanks, yes this is what I intended to say. Once you follow someone I notice that unfollow appears if they have been followed,which is great. I was wondering if there could be something similar to this for add a friend where once you have added a friend "Remove from friends" can appear?

163 months ago
sujay sreedhar (@webkoot)
Join date: Nov 11th 2010
Community posts: 98
View Profile
Send Message

add [code]<td><img src="'.uhome().'/files/icons/add_friend.gif" /></td><td align="left"><a href="'.url('friends/delete/'.$owner['id']).'">'.t('remove from friends list').'</a></td></tr>[/code] after [code]<td align="right"><img src="'.uhome().'/files/icons/message.gif" /></td><td align="left"><a href="'.url('message/compose/u'.$owner['id']).'">'.t('Message').'</a></td></tr>[/code]

163 months ago
1
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

it think there is a <tr> missing: now you will get 3 icons with links (follow/unfollow, message,remove friend) in a row instead of 2, and you will have one </tr> to much.

163 months ago
TB (@tbcreations)
Join date: Nov 5th 2010
Community posts: 31
View Profile
Send Message

Thanks, it worked!

163 months ago